package model;

import java.util.Enumeration;

import javax.swing.tree.MutableTreeNode;
import javax.swing.tree.TreeNode;

public class NodeMp3 implements MutableTreeNode {

	// class for mp3 nodes, contains mp3 information in Mp3Data class
	
	public Mp3Data mp3;
	public boolean hasChanged;
	
	private MutableTreeNode parent;
	
	
	public NodeMp3(Mp3Data mp3) {
		super();
		this.mp3 = mp3;
	}

	@Override
	public String toString(){
		return this.mp3.getFileName();
	}
	
	@Override
	public Enumeration<MutableTreeNode> children() {
		return null;
	}

	@Override
	public boolean getAllowsChildren() {
		return false;
	}

	@Override
	public TreeNode getChildAt(int arg0) {
		return null;
	}

	@Override
	public int getChildCount() {
		return 0;
	}

	@Override
	public int getIndex(TreeNode arg0) {
		return -1;
	}

	@Override
	public TreeNode getParent() {
		return this.parent;
	}

	@Override
	public boolean isLeaf() {
		return true;
	}

	@Override
	public void insert(MutableTreeNode arg0, int arg1) {

	}

	@Override
	public void remove(int arg0) {

	}

	@Override
	public void remove(MutableTreeNode arg0) {

	}

	@Override
	public void removeFromParent() {
		this.parent.remove(this);
		this.parent = null;
	}

	@Override
	public void setParent(MutableTreeNode arg0) {
		this.parent = arg0;
	}

	@Override
	public void setUserObject(Object arg0) {
		// TODO Auto-generated method stub

	}

}
